package com.windowes.weichang.access;

import com.windowes.weichang.pojo.WUser;

/***
 *
 * @author: yangqing
 * @email: qing.yang@bangdao-tech.com
 * @createTime: 2018/6/1 上午11:25
 * @description:
 *
 **/
public class UserContext {
    private static ThreadLocal<WUser> userHolder = new ThreadLocal<WUser>();
    private static ThreadLocal<Integer> deptIdHolder = new ThreadLocal<Integer>();


    public static void setUser(WUser user) {
        userHolder.set(user);
    }

    public static WUser getUser() {
        return userHolder.get();
    }


    public static Integer getDeptId() {
        return deptIdHolder.get();
    }

    public static void setDeptId(Integer deptId) {
        deptIdHolder.set(deptId);
    }
}